<template>
    <div>
      <p></p>
      <p></p>
      <x-textarea title="网络RPC地址:"  placeholder="RPC地址(http://127.0.0.1:8545)" v-model="rpc_url" :show-counter="false" ref="rpc_url"></x-textarea>
      <x-button type="primary" @click.native="rpcSave">修改</x-button>
      <p></p>
    </div>
</template>

<script>
  import {TransferDom, XHeader, XInput, XButton, Box, AlertModule, Popup, XTextarea} from 'vux';

    export default {
        name: "Settings",
      components: {
        "x-header": XHeader,
        "x-input": XInput,
        "x-button": XButton,
        "box": Box,
        "popup": Popup,
        "x-textarea": XTextarea
      },
      data() {
          return {
            address:"",
            rpc_url:"http://47.254.215.233:8145",
          }
      },
      methods: {
          rpcSave : function () {
            localStorage.rpc_url = this.rpc_url;
            console.log(this.rpc_url);
          }
      },
      mounted() {
        this.rpc_url = localStorage.rpc_url;
      }

    }
</script>

<style scoped>

</style>
